﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SharpDepend.Classes
{
    public static class GraphicsDisplayHelper
    {
        public static IGraphicsDevice CreateGraphic(this IGraphicsDisplayManager _manager, string deviceName)
        {
            var devices = _manager.AvailableDevices;

            foreach (var device in devices)
            {
                if (device.DeviceName.Equals(deviceName))
                {
                    return _manager.CreateDevice(device);
                }
            }

            return null;
        }

    }
}
